/**
 *
 */
package com.zhuoyue.elmt.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.eit.eitsite.common.persistence.DataEntity;

/**
 * 电梯检验记录Entity
 * @author chenhao
 * @version 2016-09-09
 */
public class InspectionRecord extends DataEntity<InspectionRecord> {
	
	private static final long serialVersionUID = 1L;
	private String deviceId;		// 设备ID
	private String deviceCode;		// 设备注册代码
	private String inspectionType;		// 检验类型
	private String reportNo;		// 检验报告编号
	private String mainInspector;		// 主检人
	private String assistantInspector;		// 配合人
	private Date inspectionDate;		// 检验日期
	private Date nextInspectionDate;		// 下次检验日期
	private String inspectionResult;		// 检验结论
	private String defectDescription;		// 缺陷描述
	private String reportScan;		// 检验报告扫描件
	private String remark; // 备注
	
	public InspectionRecord() {
		super();
	}

	public InspectionRecord(String id){
		super(id);
	}

	@Length(min=0, max=20, message="设备ID长度必须介于 0 和 20 之间")
	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}
	
	@Length(min=0, max=21, message="设备注册代码长度必须介于 0 和 21 之间")
	public String getDeviceCode() {
		return deviceCode;
	}

	public void setDeviceCode(String deviceCode) {
		this.deviceCode = deviceCode;
	}
	
	@Length(min=0, max=20, message="检验类型长度必须介于 0 和 20 之间")
	public String getInspectionType() {
		return inspectionType;
	}

	public void setInspectionType(String inspectionType) {
		this.inspectionType = inspectionType;
	}
	
	@Length(min=0, max=30, message="检验报告编号长度必须介于 0 和 30 之间")
	public String getReportNo() {
		return reportNo;
	}

	public void setReportNo(String reportNo) {
		this.reportNo = reportNo;
	}
	
	@Length(min=0, max=30, message="主检人长度必须介于 0 和 30 之间")
	public String getMainInspector() {
		return mainInspector;
	}

	public void setMainInspector(String mainInspector) {
		this.mainInspector = mainInspector;
	}
	
	@Length(min=0, max=30, message="配合人长度必须介于 0 和 30 之间")
	public String getAssistantInspector() {
		return assistantInspector;
	}

	public void setAssistantInspector(String assistantInspector) {
		this.assistantInspector = assistantInspector;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getInspectionDate() {
		return inspectionDate;
	}

	public void setInspectionDate(Date inspectionDate) {
		this.inspectionDate = inspectionDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getNextInspectionDate() {
		return nextInspectionDate;
	}

	public void setNextInspectionDate(Date nextInspectionDate) {
		this.nextInspectionDate = nextInspectionDate;
	}
	
	@Length(min=0, max=100, message="检验结论长度必须介于 0 和 100 之间")
	public String getInspectionResult() {
		return inspectionResult;
	}

	public void setInspectionResult(String inspectionResult) {
		this.inspectionResult = inspectionResult;
	}
	
	@Length(min=0, max=1000, message="缺陷描述长度必须介于 0 和 1000 之间")
	public String getDefectDescription() {
		return defectDescription;
	}

	public void setDefectDescription(String defectDescription) {
		this.defectDescription = defectDescription;
	}
	
	@Length(min=0, max=200, message="检验报告扫描件长度必须介于 0 和 200 之间")
	public String getReportScan() {
		return reportScan;
	}

	public void setReportScan(String reportScan) {
		this.reportScan = reportScan;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
}